using System;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace WcfService1.DTO
{
    [DataContract]
    public class SalesReturnDetailDTO : INotifyPropertyChanged
    {
        private String _Description;
        private Decimal _Discount;
        private InventoryDTO _Inventory;
        private int _No;
        private PalletDTO _Pallet;
        private Decimal _Price;
        private decimal _QtyUnit;
        private Int64 _SalesReturnDetailId;
        private decimal _Tinggi;
        private Decimal _TotalDetail;
        private WarehouseDTO _Warehouse;
        private decimal _Lebar;
        private decimal _Panjang;

        [DataMember]
        public Int64 SalesReturnDetailId
        {
            get { return _SalesReturnDetailId; }
            set
            {
                _SalesReturnDetailId = value;
                RaisePropertyChanged("SalesReturnDetailId");
            }
        }


        [DataMember]
        public InventoryDTO Inventory
        {
            get { return _Inventory; }
            set
            {
                _Inventory = value;
                RaisePropertyChanged("Inventory");
            }
        }


        [DataMember]
        public Decimal Price
        {
            get { return _Price; }
            set
            {
                _Price = value;
                RaisePropertyChanged("Price");
            }
        }


        [DataMember]
        public Decimal Discount
        {
            get { return _Discount; }
            set
            {
                _Discount = value;
                RaisePropertyChanged("Discount");
            }
        }


        [DataMember]
        public String Description
        {
            get { return _Description; }
            set
            {
                _Description = value;
                RaisePropertyChanged("Description");
            }
        }


        [DataMember]
        public WarehouseDTO Warehouse
        {
            get { return _Warehouse; }
            set
            {
                _Warehouse = value;
                RaisePropertyChanged("Warehouse");
            }
        }


        [DataMember]
        public PalletDTO Pallet
        {
            get { return _Pallet; }
            set
            {
                _Pallet = value;
                RaisePropertyChanged("Pallet");
            }
        }

         [DataMember]
        public Decimal TotalDetail
        {
            get { return _TotalDetail; }
            set
            {
                _TotalDetail = value;
                RaisePropertyChanged("TotalDetail");
            }
        }

         [DataMember]
         public Decimal Panjang
         {
             get { return _Panjang; }
             set
             {
                 _Panjang = value;
                 RaisePropertyChanged("Panjang");
             }
         }

         [DataMember]
         public Decimal Lebar
         {
             get { return _Lebar; }
             set
             {
                 _Lebar = value;
                 RaisePropertyChanged("Lebar");
             }
         }


        [DataMember]
        public Decimal Tinggi
        {
            get { return _Tinggi; }
            set
            {
                _Tinggi = value;
                RaisePropertyChanged("Tinggi");
            }
        }


        [DataMember]
        public Decimal QtyUnit
        {
            get { return _QtyUnit; }
            set
            {
                _QtyUnit = value;
                RaisePropertyChanged("QtyUnit");
            }
        }

        public String SRNo { get; set; }

        public int No
        {
            get { return _No; }
            set
            {
                _No = value;
                RaisePropertyChanged("No");
            }
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        protected void RaisePropertyChanged(string propertyname)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyname));
        }
    }
}